From: Keir Fraser Date: Tue, 18 May 2010 10:24:04 +0000 (+0100) Subject: x86: Allow PV superpages to work with live migration X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12134 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=5b97152a14ab5fc47abb916d26b4490f2c9a7fff;p=xen.git x86: Allow PV superpages to work with live migration PV superpages currently do not work with live migration. They fall over dead when the shadow page table is enabled for dirty tracking. The HVM support for superpages in this code has been tested and found to work just fine for PV superpages. This patch modifies the test macro to allow the code to work with PV superpages. Signed-off-by: Keir Fraser --- diff --git a/xen/include/asm-x86/guest_pt.h b/xen/include/asm-x86/guest_pt.h index dca5044300..e7814a9da2 100644 --- a/xen/include/asm-x86/guest_pt.h +++ b/xen/include/asm-x86/guest_pt.h @@ -186,10 +186,11 @@ guest_supports_superpages(struct vcpu *v) /* The _PAGE_PSE bit must be honoured in HVM guests, whenever * CR4.PSE is set or the guest is in PAE or long mode. * It's also used in the dummy PT for vcpus with CR4.PG cleared. */ - return (is_hvm_vcpu(v) && - (GUEST_PAGING_LEVELS != 2 - || !hvm_paging_enabled(v) - || (v->arch.hvm_vcpu.guest_cr[4] & X86_CR4_PSE))); + return (!is_hvm_vcpu(v) + ? opt_allow_hugepage + : (GUEST_PAGING_LEVELS != 2 + || !hvm_paging_enabled(v) + || (v->arch.hvm_vcpu.guest_cr[4] & X86_CR4_PSE))); } static inline int